package com.fingard.dsp.bank.reqrespobj.billpool;

import com.fingard.dsp.bank.reqrespobj.ReqRespHeader;
import com.fingard.dsp.bank.reqrespobj.RetAtsBase;
import com.fingard.dsp.bank.reqrespobj.billpool.Detail.RetAtsB324InPoolRegisterDetail;
import com.fingard.xml.XmlTextWriter;

public class RetAtsB324InPoolRegister extends RetAtsBase {
    public String respCode;
    public String respInfo;
    public String tatalcount;
    public String totalamt;
    public RetAtsB324InPoolRegister(ReqRespHeader p_header) {
        retHeader = p_header;
        retXmlWriter = new XmlTextWriter();
    }

    public void writeRetDetail(RetAtsB324InPoolRegisterDetail p_retDetail) throws Exception {
        retXmlWriter.writeStartElement("DetailRecord");
        retXmlWriter.writeElementString("Account", p_retDetail.Account);
        retXmlWriter.writeElementString("ClientId", p_retDetail.ClientId);
        retXmlWriter.writeElementString("Custname", p_retDetail.Custname);
        retXmlWriter.writeElementString("Inpooltype", p_retDetail.Inpooltype);
        retXmlWriter.writeElementString("Billcode", p_retDetail.Billcode);
        retXmlWriter.writeElementString("Billamt", p_retDetail.Billamt);
        retXmlWriter.writeElementString("Billmedium", p_retDetail.Billmedium);
        retXmlWriter.writeElementString("Billtype", p_retDetail.Billtype);
        retXmlWriter.writeElementString("Outdate", p_retDetail.Outdate);
        retXmlWriter.writeElementString("Duedate", p_retDetail.Duedate);
        retXmlWriter.writeElementString("Drawername", p_retDetail.Drawername);
        retXmlWriter.writeElementString("Deaweracctno", p_retDetail.Deaweracctno);
        retXmlWriter.writeElementString("DrawerBankName", p_retDetail.DrawerBankName);
        retXmlWriter.writeElementString("DrawerCNAPSCode", p_retDetail.DrawerCNAPSCode);

        retXmlWriter.writeElementString("Payeename", p_retDetail.Payeename);
        retXmlWriter.writeElementString("Payeeacctno", p_retDetail.Payeeacctno);
        retXmlWriter.writeElementString("Payeebankname", p_retDetail.Payeebankname);
        retXmlWriter.writeElementString("Payeebankcode", p_retDetail.Payeebankcode);

        retXmlWriter.writeElementString("Acceptor", p_retDetail.Acceptor);
        retXmlWriter.writeElementString("AcceptorAccountNum", p_retDetail.AcceptorAccountNum);
        retXmlWriter.writeElementString("AcceptorCNAPSCode", p_retDetail.AcceptorCNAPSCode);
        retXmlWriter.writeElementString("AcceptbankName", p_retDetail.AcceptbankName);

        retXmlWriter.writeElementString("Drawerbankname", p_retDetail.Drawerbankname);
        retXmlWriter.writeElementString("Drawerbankcode", p_retDetail.Drawerbankcode);
        retXmlWriter.writeElementString("Bailcontractno", p_retDetail.Bailcontractno);
        retXmlWriter.writeElementString("Tradedate", p_retDetail.Tradedate);

        retXmlWriter.writeElementString("Loantovalueratio", p_retDetail.Loantovalueratio);
        retXmlWriter.writeElementString("Billstatus", p_retDetail.Billstatus);
        retXmlWriter.writeElementString("Belongorgno", p_retDetail.Belongorgno);
        retXmlWriter.writeElementString("Belongrorgname", p_retDetail.Belongrorgname);

        retXmlWriter.writeElementString("InPoolTime", p_retDetail.InPoolTime);
        retXmlWriter.writeElementString("CollType", p_retDetail.CollType);
        retXmlWriter.writeElementString("TransFlg", p_retDetail.TransFlg);
        retXmlWriter.writeElementString("PayFlag", p_retDetail.PayFlag);
        retXmlWriter.writeEndElement();
    }


    public void writeBeforeDetail() throws Exception {
        retXmlWriter.writeElementString("RespCode", respCode);
        retXmlWriter.writeElementString("RespInfo", respInfo);
        retXmlWriter.writeElementString("Tatalcount", tatalcount);
        retXmlWriter.writeElementString("Totalamt",totalamt);
    }

}
